﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules
{
    /// <summary>
    /// app考勤授权（项目、参建企业）
    ///</summary>
    [TableName("app_checkin_auth")]
    [Description("app考勤授权信息")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true, PropertyNamesOfArea = "ProjectId")]
    [Serializable]
    public class AppCheckinAuth : IEntity
    {
        /// <summary>
        /// 主键
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目id
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 参建单位id
        ///</summary>
        [Column("corp_id")]
        public int? CorpId { get; set; }

        /// <summary>
        /// 开始日期
        ///</summary>
        [Column("start_date")]
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 结束日期
        ///</summary>
        [Column("end_date")]
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 是否禁用
        ///</summary>
        [Column("is_disable")]
        public bool IsDisable { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后一次修改时间
        ///</summary>
        [Column("last_update_time")]
        public DateTime LastUpdateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}